package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.RestaurantGoodsDetail;
import com.ruoyi.system.mapper.RestaurantGoodsDetailMapper;
import com.ruoyi.system.service.RestaurantGoodsDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: ruohao
 * @Date: 2023/9/4
 **/
@Service
public class RestaurantGoodsDetailServiceImpl implements RestaurantGoodsDetailService {
    @Resource
    private RestaurantGoodsDetailMapper restaurantGoodsDetailMapper;

    @Override
    public List<RestaurantGoodsDetail> selectList(RestaurantGoodsDetail restaurantGoodsDetail) {
        return restaurantGoodsDetailMapper.selectRestaurantGoodsDetailList(restaurantGoodsDetail);
    }

    @Override
    public RestaurantGoodsDetail selectById(Long id) {
        return restaurantGoodsDetailMapper.selectRestaurantGoodsDetailById(id);
    }

    @Override
    public Boolean create(RestaurantGoodsDetail restaurantGoodsDetail) {
        return restaurantGoodsDetailMapper.insertRestaurantGoodsDetail(restaurantGoodsDetail) == 1;
    }

    @Override
    public Boolean update(RestaurantGoodsDetail restaurantGoodsDetail) {
        return restaurantGoodsDetailMapper.updateRestaurantGoodsDetail(restaurantGoodsDetail) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return restaurantGoodsDetailMapper.deleteRestaurantGoodsDetail(id) == 1;
    }
}
